﻿using System.Collections.Generic;

namespace Prompts.Prompting.Controls
{
    public interface ISelector
    {
        void Select(ICollection<ITreeItem> items, ITreeItem item);
    }

    public class Selector : ISelector
    {
        public void Select(ICollection<ITreeItem> items, ITreeItem item)
        {
            foreach (var treeItem in items)
            {
                treeItem.IsSelected2 = treeItem == item;
            }
        }
    }
}
